Release 10.1A: OpenEdge Development:
Programming Interfaces


Instantiating the control

At runtime, your application uses AppBuilder-generated code to instantiate any ActiveX controls. This code (shown in following sections) uses the CREATE Widget statement to realize a separate control-frame widget for each ActiveX control, initializing each control-frame with the name specified at design time. It then invokes the LoadControls() method on each control-frame COM object to instantiate the corresponding ActiveX control, loading all design time definitions from the .wrx file.

Figure 16–3 describes the instantiation process for a single ActiveX control.

Figure 16–3: Instantiating an ActiveX control at runtime

Creating the control-frame widget does not, by itself, realize the control-frame. Control-frame realization occurs only after (1) it is parented to a frame widget and (2) its NAME attribute is set or its COM-HANDLE attribute is referenced. The NAME attribute is generally set first and causes realization by creating the control-frame COM object. Only then can your application use the LoadControls() method to (3) load the control into the control-frame COM object (the control container).

Note: The control-frame name must match the name specified at design time to allow LoadControls() to locate the specified ActiveX control in the .wrx file.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095